package com.excesys.exsecs.access.mapper;

import cn.hutool.json.JSONObject;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.excesys.exsecs.access.entity.DataFlowOperation;
import org.apache.ibatis.annotations.*;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

@Mapper
public interface ExecuteSqlMapper extends BaseMapper<Object> {

	@Select("${sql}")
	@DS("secord")
	@InterceptorIgnore(tenantLine = "true")
	int checkTableExists(String sql);

	@Update("${sql}")
	@DS("secord")
	@InterceptorIgnore(tenantLine = "true")
	void executeCreateTableSql(@Param("sql") String sql);

	@Select("${sql}")
	@DS("secord")
	@InterceptorIgnore(tenantLine = "true")
	List<Map> executeQuerySql(@Param("sql") String sql);

	@Update("${sql}")
	@DS("secord")
	@InterceptorIgnore(tenantLine = "true")
	void executeDropTableSql(@Param("sql") String sql);


}
